package com.yinhe.music.yhmusic.localmusic.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yinhe.music.common.GlideHelper.GlideHelper;
import com.yinhe.music.yhmusic.R;
import com.yinhe.music.yhmusic.model.SingerList;

import java.util.List;

/**
 * Created by hasee on 2017/8/15.
 */

public class LocalSingerAdapter extends BaseQuickAdapter<SingerList, BaseViewHolder> {

    public LocalSingerAdapter(List<SingerList> data) {
        super(R.layout.singer_item,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SingerList item) {
        helper.setText(R.id.name_view, item.getSingerName());
        ImageView image = helper.getView(R.id.image_view);
        GlideHelper.setCircleImageResource(image, item.getImage(), R.drawable.ic_default_singer);
    }
}
